﻿using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 学年学期基础输入参数
    /// </summary>
    public class XuenianXueqiBaseInput
    {
        /// <summary>
        /// 学年
        /// </summary>
        public virtual int Xuenian { get; set; }
        
        /// <summary>
        /// 学期
        /// </summary>
        public virtual int Xueqi { get; set; }
        
        /// <summary>
        /// 学期代码
        /// </summary>
        public virtual string Code { get; set; }
        
        /// <summary>
        /// 学期名称
        /// </summary>
        public virtual string Fullname { get; set; }
        
        /// <summary>
        /// 开学时间
        /// </summary>
        public virtual DateTime StartDate { get; set; }
        
        /// <summary>
        /// 当前学期
        /// </summary>
        public virtual bool IsCurrent { get; set; }
        
        /// <summary>
        /// 隐藏
        /// </summary>
        public virtual bool IsHidden { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        public virtual string? Beizhu { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
    }

    /// <summary>
    /// 学年学期分页查询输入参数
    /// </summary>
    public class XuenianXueqiInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 学年
        /// </summary>
        public int? Xuenian { get; set; }
        
        /// <summary>
        /// 学期
        /// </summary>
        public int? Xueqi { get; set; }
        
        /// <summary>
        /// 学期代码
        /// </summary>
        public string? Code { get; set; }
        
        /// <summary>
        /// 学期名称
        /// </summary>
        public string? Fullname { get; set; }
        
        /// <summary>
        /// 开学时间
        /// </summary>
        public DateTime? StartDate { get; set; }
        
        /// <summary>
         /// 开学时间范围
         /// </summary>
         public List<DateTime?> StartDateRange { get; set; } 
        /// <summary>
        /// 当前学期
        /// </summary>
        public bool? IsCurrent { get; set; }
        
        /// <summary>
        /// 隐藏
        /// </summary>
        public bool? IsHidden { get; set; }
        
    }

    /// <summary>
    /// 学年学期增加输入参数
    /// </summary>
    public class AddXuenianXueqiInput : XuenianXueqiBaseInput
    {
        /// <summary>
        /// 学年
        /// </summary>
        [Required(ErrorMessage = "学年不能为空")]
        public override int Xuenian { get; set; }
        
        /// <summary>
        /// 学期
        /// </summary>
        [Required(ErrorMessage = "学期不能为空")]
        public override int Xueqi { get; set; }
        
        /// <summary>
        /// 学期代码
        /// </summary>
        [Required(ErrorMessage = "学期代码不能为空")]
        public override string Code { get; set; }
        
        /// <summary>
        /// 学期名称
        /// </summary>
        [Required(ErrorMessage = "学期名称不能为空")]
        public override string Fullname { get; set; }
        
        /// <summary>
        /// 开学时间
        /// </summary>
        [Required(ErrorMessage = "开学时间不能为空")]
        public override DateTime StartDate { get; set; }
        
        /// <summary>
        /// 当前学期
        /// </summary>
        [Required(ErrorMessage = "当前学期不能为空")]
        public override bool IsCurrent { get; set; }
        
        /// <summary>
        /// 隐藏
        /// </summary>
        [Required(ErrorMessage = "隐藏不能为空")]
        public override bool IsHidden { get; set; }
        
    }

    /// <summary>
    /// 学年学期删除输入参数
    /// </summary>
    public class DeleteXuenianXueqiInput : BaseIdInput
    {
    }

    /// <summary>
    /// 学年学期更新输入参数
    /// </summary>
    public class UpdateXuenianXueqiInput : XuenianXueqiBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 学年学期主键查询输入参数
    /// </summary>
    public class QueryByIdXuenianXueqiInput : DeleteXuenianXueqiInput
    {

    }
